package MtG.publicClass.messages;

import MtG.publicClass.Message;
import MtG.publicClass.Player;

/**
 * @author Marek Sirp
 * @author Jaan Sepp
 */
public class Attack extends Message{
	/**
	 * Determines if a de-serialized file is compatible with this class.
	 */
	private static final long serialVersionUID = 8208833357152090212L;

	/**
	 * Constructor.
	 * @param attacker player that attacks.
	 * @param defender player that defends.
	 * @param dealt amount of damage dealt to the defender.
	 * @param lifePointLost amount of hit points lost by the defender. 
	 * @param deadCards amount of cards that died in the process of this attack.
	 */
	public Attack(Player attacker, Player defender, int dealt, int lifePointLost,  int deadCards){
		setMessage(attacker.getName() + " attacked " + defender.getName() + " and dealt " + dealt + "p damage.\nDefender lost " + 
				lifePointLost + " hitpoints and " + deadCards + " monstercard(s).\n" + new EndTurn(defender));
	}

}
